﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Raffles.OA.Data
{
    /// <summary>
    /// 首页图表Vo
    /// </summary>
    public class ReportChartVo
    { 
        /// <summary>
        /// 销售总额
        /// </summary>
        public decimal? SaleAmountTotal { get; set; }

        /// <summary>
        /// 项目总数
        /// </summary>
        public int ProjectTotal { get; set; }

        /// <summary>
        /// 销售个人月销售总额
        /// </summary>
        public SalerMonthAmountItem SalerMonthAmounts { get; set; } = new SalerMonthAmountItem();

        /// <summary>
        /// 销售个人年销售占比
        /// </summary>
        public List<SalerYearAmountRateItem> SalerYearAmountRates { get; set; } = new List<SalerYearAmountRateItem>();

        /// <summary>
        /// 团队年销售总额
        /// </summary>
        public List<decimal> GroupYearAmounts { get; set; } = new List<decimal>(); 
    }

    /// <summary>
    /// 销售个人月销售总额
    /// </summary>
    public class SalerMonthAmountItem
    {
        /// <summary>
        /// 销售人员
        /// </summary>
        public List<string> Salers { get; set; } = new List<string>();
        /// <summary>
        /// 销售金额
        /// </summary>
        public List<SalerMonthAmountItemDetail> SalerMonthAmountItemDetails { get; set; }=new List<SalerMonthAmountItemDetail>();
    }

    public class SalerMonthAmountItemDetail
    {
        /// <summary>
        /// 销售姓名
        /// </summary>
        public string name { get; set; } 
        public string type { get; set; }= "bar"; 
        public int barWidth { get; set; } = 30;  
        /// <summary>
        /// 销售金额
        /// </summary>
        public List<decimal> data { get; set; }= new List<decimal>(); 
    } 
    /// <summary>
    /// 销售个人年销售占比
    /// </summary>
    public class SalerYearAmountRateItem
    {
        public decimal? value { get; set; }
        public string name { get; set; }
    }
}